Import('examplesEnv')

myEnv = examplesEnv.Clone()


if myEnv['BUILD_PVAR'] == True:
	pvarLibrary = myEnv.SharedLibrary('pvar', 'pvar.c')
	Return('pvarLibrary')
else:
	Import('pmallocLibrary')
	Import('mcoreLibrary')
	Import('mtmLibrary')
	Import('pvarLibrary')
	sources = Split("""main.c""")
	myEnv.Append(LIBS = [pmallocLibrary])
	myEnv.Append(LIBS = [pvarLibrary])
	myEnv.Append(LIBS = [mcoreLibrary])
	myEnv.Append(LIBS = [mtmLibrary])
	myEnv.Program('simple', sources)
